﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
namespace ChuanPlus
{
    public class Warehouse : XPLiteObject
    {
        int fwarehouseId;
        [Key(true)]
        public int warehouseId
        {
            get { return fwarehouseId; }
            set { SetPropertyValue<int>("warehouseId", ref fwarehouseId, value); }
        }
        string fwarehouseName;
        [Size(50)]
        public string warehouseName
        {
            get { return fwarehouseName; }
            set { SetPropertyValue<string>("warehouseName", ref fwarehouseName, value); }
        }
        string fdescription;
        [Size(200)]
        public string description
        {
            get { return fdescription; }
            set { SetPropertyValue<string>("description", ref fdescription, value); }
        }
        public Warehouse(Session session) : base(session) { }
        public Warehouse() : base(Session.DefaultSession) { }
        /// <summary>
        /// Initializes a new instance of the Warehouse class.
        /// </summary>
        /// <param name="fwarehouseId"></param>
        /// <param name="fwarehouseName"></param>
        /// <param name="fdescription"></param>
        public Warehouse(int fwarehouseId, string fwarehouseName, string fdescription)
        {
            this.fwarehouseId = fwarehouseId;
            this.fwarehouseName = fwarehouseName;
            this.fdescription = fdescription;
        }
        public override void AfterConstruction() { base.AfterConstruction(); }
        public override string ToString()
        {
            return warehouseName;
        }
    }
}
